package com.itheima.service;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.dao.MemberDao;
import com.itheima.pojo.Member;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author: libin
 * @date: 2019/11/29 11:03
 * @version: 1.0
 * @describe:
 */
@Service(interfaceClass = MemberService.class)
@Transactional
public class MemberServiceImpl implements MemberService {
    @Autowired
    private MemberDao memberDao;
    @Override
    public Member findBytelephone(String telephone) {
        return memberDao.findByTelephone(telephone);
    }

    @Override
    public Member add(Member member) {
        memberDao.add(member);
        return member;//返回会员id
    }
}
